function M = methods(S)
% BVQXfigure::methods  - return available method names

% Version:      v0.7b
% Build:        7090409
% Date:         Sep-04 2007, 9:44 AM CEST
% Author:       Jochen Weber, Brain Innovation, B.V., Maastricht, NL
% URL / Info:   http://wiki.brainvoyager.com/BVQXtools

% stored in persistent array
global bvqxfigure_methods;
if isempty(bvqxfigure_methods)
    bvqxfigure_methods.m = struct( ...
        'AddString',        {{'^(cell|char)$', '[^double$'}}, ...
        'AddUIContextMenu', {{'^struct$'}}, ...
        'AddUIControl',     {{'^struct$'}}, ...
        'AddUIMenu',        {{'^struct$'}}, ...
        'BringToFront',     {{}}, ...
        'CreateFigure',     {{'^struct$'}}, ...
        'DeleteAllFigures', {{}}, ...
        'Delete',           {{'[^(bvqxfigure|double)$'}}, ...
        'DoCallback',       {{'[^(bvqxfigure|double)$'}}, ...
        'Get',              {{'^char$'}}, ...
        'GetContext',       {{}}, ...
        'IsActive',         {{}}, ...
        'IsEnabled',        {{}}, ...
        'IsVisible',        {{}}, ...
        'LoadFields',       {{'[^(cell|char)$'}}, ...
        'MLHandle',         {{}}, ...
        'MultiDelete',      {{'^double$'}}, ...
        'MultiMove',        {{'^double$', '[^double$'}}, ...
        'MultiSize',        {{}}, ...
        'MultiString',      {{'[^double$', '[^(cell|char)$', '[^(double|logical)$'}}, ...
        'ParentObj',        {{}}, ...
        'PrevProps',        {{}}, ...
        'Progress',         {{'[^double$', '[^char$'}}, ...
        'RadioGroups',      {{}}, ...
        'RadioGroupSetOne', {{'[^(bvqxfigure|double)$'}}, ...
        'Redraw',           {{}}, ...
        'Resize',           {{}}, ...
        'SaveFields',       {{'[^(cell|char)$'}}, ...
        'Set',              {{'^char$', '^[a-z][a-z0-9]+$'}}, ...
        'SetContext',       {{'[^(bvqxfigure|double)$'}}, ...
        'SetGroupEnabled',  {{'^char$'}}, ...
        'SetGroupVisible',  {{'^char$'}}, ...
        'ShowPage',         {{'[^(char|double)$'}}, ...
        'SlideGroupXY',     {{'^char$', '^double$', '[^double$'}}, ...
        'TagStruct',        {{}}, ...
        'TypeStruct',       {{}}, ...
        'UpdateField',      {{}}, ...
        'UpdateFields',     {{'[^char$'}}, ...
        'Value',            {{}}  ...
    );
    bvqxfigure_methods.t = { ...
        logical([0 0 0 0 0 1 1 1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0]), ...
        logical([0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0]), ...
        logical([1 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1]), ...
        logical([0 0 0 0 1 0 0 1 1 1 0 1 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 0]), ...
        logical([0 0 0 0 0 0 0 1 1 1 0 1 1 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0])};
end

% only accept single object
if numel(S) ~= 1
    M = {};
    return;
end

try
    Mall = fieldnames(bvqxfigure_methods.m);
    M = Mall(bvqxfigure_methods.t{S.type + 1});
catch
    error( ...
        'BVQXfigure:LookupError', ...
        'Error looking up methods.' ...
    );
end
